
<template>
  <div class="sync-loding" v-show="getLoading">
    <div class="ldbox">
      <span class="loading"></span>
      <span class="text">加载中...</span>
    </div>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapGetters({
      getLoading: "getLoading"
    })
  }
};
</script>
 
<style lang="less" rel="stylesheet/less">
.sync-loding,
.loding {
  width: 16rem;
  height: 100%;
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 0;
  margin-left: -8rem;
  -webkit-overflow-scrolling: none;
  pointer-events: auto;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  .loading {
    display: block;
    width: 0.8rem;
    height: 0.8rem;
    border: 3px solid #fff;
    top: 50%;
    left: 50%;
    margin-left: -0.4rem;
    margin-top: -0.6rem;
    position: absolute;
    border-radius: 50%;
    border-top-color: transparent;
    animation: rotate 0.5s linear infinite;
  }
  .text {
    position: absolute;
    bottom: 6px;
    width: 100%;
    text-align: center;
    font-size: 0.6rem;
  }
  .ldbox {
    font-size: 0.5rem;
    width: 3rem;
    height: 3rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.39);
    border-radius: 5px;
  }
}
</style>
